<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<form id="bedroomForm">
	<div class="easyui-panel"
		style="width: 100%; padding: 20px 50px; border: none;overflow: hidden;">

		<input type="hidden" name="id" value="${bedroom.id}">
		<input type="hidden" name="count" value="${bedroom.count}">
		<input type="hidden" name="delete" value="${bedroom.delete}">
		<input type="hidden" name="state" value="${bedroom.state}">
		<input type="hidden" name="studentId" value="${bedroom.studentId.id}">
		
	
		<div style="width: 100%;" class="form-item">
		
			<label class="label-top">寝室名</label> 
				
			<input  id="name" data-options="required:true" style="width: 200px;" name="name" class="easyui-textbox" value="${bedroom.name}"/>
				
		</div>

		<div style="margin-bottom: 20px; width: 100%;" class="form-item">
		
			<label class="label-top">床位总数</label> 
			
				<input id="bed" class="easyui-numberspinner" style="width: 200px;" data-options="required:true" value="${bedroom.bed}" name="bed" max="12" min="${bedroom.count}" >
			
			
		</div>


		<div class="form-item" data-options="required:true">
		
			<label class="label-top">寝室类型</label> 
  			
  				<select id="bedroomType" class="easyui-combobox" style="width: 200px;" name="bedroomType" data-options="editable:false,required:true,panelHeight:'auto'">
  					<c:if test="${empty students}">
							<option value="男寝" ${empty bedroom ||  bedroom.bedroomType == '男寝'?'selected="selected"':'' }>男寝</option>
					
							<option value="女寝" ${bedroom.bedroomType=='女寝'?'selected="selected"':''}>女寝</option> 
						</c:if>
						<c:if test="${not empty students}">
						<option value="${students[0].gender}寝">${students[0].gender}寝</option>
						</c:if>
			</select>
			
		</div>


	</div>

</form>